<!DOCTYPE html>
<html class="" lang="en">
<head>
	<title>Hitech</title>
	<meta charset="utf-8"/>
	<meta name="viewport" content="width=device-width, initial-scale=1.0">

		<link rel="stylesheet" type="text/css" href="/css/bootstrap.min.css">	
		<link rel="stylesheet" type="text/css" href="/css/all.min.css">				
		<link rel="stylesheet" type="text/css" href="/css/owl.theme.default.min.css">
		<link rel="shortcut icon" type="image/x-icon" href="/img/Favicon.ico">
		<link rel="stylesheet" type="text/css" href="/css/fontawesome.css">
		<link rel="stylesheet" type="text/css" href="/css/fontawesome.min.css">
		<link rel="stylesheet" type="text/css" href="/css/style.css">
		<link rel="stylesheet" type="text/css" href="/css/media.css">
		<link rel="stylesheet" type="text/css" href="/css/responsive.css">
		<link rel="stylesheet" type="text/css" href="/css/owl.carousel.css">
		<link rel="stylesheet" type="text/css" href="/css/animate.min.css">
	<link rel="stylesheet" href="/lib/layui-v2.6.3/css/layui.css" media="all">
	<link rel="stylesheet" href="/css/public.css" media="all">


</head>
<body>
<th:block th:include="header"/>

	<div id="title_page" class="mesonry-portfolio-2-page portfolio_mas animate__animated animate__fadeInUp">

		<div class="sp_header bg-white p-3">
			<div class="container custom_container ">	
				<div class="row ">
					<div class="col-12 ">
						<ul>
							<li class="d-inline-block font-weight-bolder"><a href="/index">首页</a></li>
							<li class="d-inline-block hr_ font-weight-bolder"><a>订单号:</a></li>
							<span th:text="${billCode}"></span>
						</ul>
					</div>
				</div>
			</div>
		</div>

		<div class="container custom_container t_page">
			
			<div class="row title">
				<div class="col-12">
					<div class="title1 text-center">
						<h5 >请扫描下方二维码进行支付 订单将在</h5>
						<h5 id="deleteBill"></h5>
						<h5>秒后自动取消~</h5>
						<h2 class="font-weight-bold" style="margin-bottom: 30px">订单提交成功</h2>
					</div>
					<img th:src="${'https://api.qrserver.com/v1/create-qr-code/?data='+qrcode}" style="margin-left: 643px"/>
				</div>
			</div>



		</div> <!-- container custom_container -->

	</div> <!-- portfolio_2_page -->
<th:block th:include="end"/>



	<script src="/js/jquery-3.4.1.min.js"></script>
	<script src="/js/owl.carousel.js"></script>
	<script src="/js/bootstrap.min.js"></script>
	<script src="/js/popper.min.js"></script>
	<script src="/js/all.min.js"></script>
	<script src="/js/index.js"></script>
	<script src="/js/wow.min.js"></script>
<script src="../lib/layui-v2.6.3/layui.js" charset="utf-8"></script>
<script>
	layui.use([ 'form', 'table', 'layer'], function() {
		var $ = layui.jquery, form = layui.form, table = layui.table;
		layer = layui.layer;
		//不停往页面上查请求，查询支付状态，当付款成功时-跳转页面
		var billId='[[${billId}]]';
		var loadStatus=function() {
		    $.post("/billSuccess/payStatus?id="+billId,function (res){
				if(res=='待支付'){
					loadStatus();
				}else if (res == '已取消'){
					window.location.href="/payFail/payFailPage"
				}
				else{
					window.location.href="/paySuccess/paySuccessPage";
				}
			});
		};
		loadStatus();


		var countdown = 60; // 倒计时初始时间为60秒
		function setTimeRun() {
			if (countdown == 0) {

			} else {
				$("#deleteBill").html(countdown);
				countdown--;
				setTimeout(setTimeRun, 1000);
			}
		}
		setTimeRun();
	});
</script>
</body>
</html>



